﻿using LibNiconico.NiconicoApi.Lives.Broadcast;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace NicoView.View.Converter
{
    public class LivePublicStatusIsCommunityOnlyConverter:IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var publicStatus = (NicoLivePublicStatus)value;

            return publicStatus == NicoLivePublicStatus.CommunityOnly;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var target = (bool)value;

            return target ? NicoLivePublicStatus.CommunityOnly : NicoLivePublicStatus.All;
        }
    }
}
